use axum::{middleware, Router};

mod project;
mod template;
mod file;
mod mysql;
mod mongodb;

pub fn routes() -> Router {
    Router::new()
    .nest("/project",project::auth_routes())
    .nest("/template",template::auth_routes())
    .nest("/file",file::auth_routes())
    .nest("/mysql",mysql::auth_routes())
    .nest("/mongodb",mongodb::auth_routes())
    .route_layer(middleware::from_fn(com::perm::admin::auth))
}